home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGSCAL / TBUTIL2.LZH / WINDDEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1986-02-23  |  8KB  |  240 lines

  1.  
  2.  
  3. {                          The Window Manager
  4.                                    by
  5.                              Jim Everingham
  6.                            (C) Copyright 1985
  7.                                January 13
  8.  
  9.                  Ultra-Fast Window Generation for Turbo
  10.                  Pascal 2.0 made Simple.
  11.  
  12.     All questions concerning this package should be directed towards:
  13.  
  14.                              Jim Everingham
  15.                              215 West Fairmount Ave
  16.                              Apt. #306 Fairmount Hills
  17.                              State College, Pa. 16801
  18.                              (814)-238-9655
  19.                              Compuserve [75116,433]
  20.  
  21.     If you find these routines of use, or use them in commercially produced
  22.     Software, a donation of $5.00 to $15.00 is appreciated. Please read
  23.     WINDMNGR.DOC wich accompanies this package.
  24.  
  25.                                                                          }
  26. {$I VAR.INC}
  27. {$I WINDMNGR.INC}
  28. {$I GROWWIN.INC}
  29.  
  30. Const NumChar = 20;
  31.       Title_char: Array[1..NumChar] of char =
  32.                ('T','H','E',' ',' ','W','I','N','D','O','W',' ',' ','M','A','N'
  33.                ,'A','G','E','R');
  34.  
  35. Var Ch: CHar;
  36.      i,j,k: integer;
  37.  
  38. Begin
  39.      Add_window(1,1,80,25,1,0,4);
  40.      textcolor(15);
  41.      j:=47;
  42.      for i:=numchar downto 1 do
  43.           begin
  44.              for k:=1 to j do
  45.                     begin
  46.                          gotoxy(k,2);
  47.                          Write(' ',Title_Char[i]);
  48.                     end;
  49.              j:=j-1
  50.           end;
  51.      gotoxy(1,3);
  52.      textcolor(7);
  53.      Writeln('                            (C) Copyright  1985');
  54.      Writeln('                                     by ');
  55.      Writeln('                               Jim Everingham');
  56.      Writeln;
  57.      Writeln('    The Window Manager is written for Turbo Pascal 2.0 IBM PC-DOS Specific.');
  58.      Writeln(' This  program was  developed on a COLUMBIA MPC 1600-1.  ');
  59.      writeln;
  60.      Writeln('    The Window  manager is  collection of Ultra-Fast window  routines which');
  61.      Writeln(' can easily be added into your own Turbo Pascal programs. If you find these');
  62.      Writeln(' routines  of  value, please donate $10 dollars. It''s for a good cause, my');
  63.      Writeln(' tuition bill.');
  64.      Writeln(' I have also provided the version of all demos in case you are considering');
  65.      Writeln(' purchasing the TURBO Pascal System.');
  66.      Writeln('                               Jim Everingham');
  67.      Writeln('                               318 East Sheridan');
  68.      Writeln('                               DuBois, Pa. 15801');
  69.      Writeln('                               CIS: 75116,433');
  70.      Writeln('                               Tel: 814-238-9655');
  71.      Writeln;
  72.      textcolor(11);
  73.      Write('                         Press any key to begin Demo...');
  74.      repeat until keypressed;
  75.      read(kbd,ch);
  76.      Add_Window(5,5,50,18,12,7,2);
  77.      gotoxy(1,2);
  78.      Textcolor(black);Writeln;
  79.      Writeln('     With The Window Manager, windows');
  80.      Writeln('     can be completely manipulated with');
  81.      Writeln('     as little as two commands which do');
  82.      Writeln('     all the tough work of setting up ');
  83.      Writeln('     windows on your RGB or MonoChrome');
  84.      Writeln('     monitor.  Window manager routines');
  85.      Writeln('     keep track of which window is active');
  86.      Writeln('     and which window to activate next.');
  87.      Writeln;Writeln;Textcolor(black+blink);
  88.      Write('             Press a key ...');
  89.      repeat until keypressed;
  90.      read(kbd,ch);
  91.      Add_window(29,3,70,9,11,0,3);
  92.      Writeln(' All in all, four different frame types');
  93.      Writeln(' can be used.');
  94.      Writeln;Write('            Press a key ... ');
  95.      repeat until keypressed;
  96.      read(kbd,ch);
  97.      Add_window(5,12,25,21,12,0,1);
  98.      textcolor(15);
  99.      write(' Plain...');
  100.      repeat until keypressed;
  101.      read(kbd,ch);
  102.      Add_window(31,12,51,21,12,0,2);
  103.      textcolor(15);
  104.      write(' Double...');
  105.      repeat until keypressed;
  106.      read(kbd,ch);
  107.      Add_window(57,12,77,21,12,0,3);
  108.      textcolor(15);
  109.      write(' Combination...');
  110.      repeat until keypressed;
  111.      read(kbd,ch);
  112.      Add_window(5,10,77,22,12,0,4);
  113.      textcolor(15);
  114.      writeln;
  115.      write(' Solid frames also... ');
  116.      repeat until keypressed;
  117.      read(kbd,ch);
  118.      Remove(1);
  119.      delay(250);
  120.      remove(1);
  121.      delay(250);
  122.      remove(1);
  123.      delay(250);
  124.      remove(1);
  125.      textcolor(10+blink);
  126.      repeat until keypressed;
  127.      read(kbd,ch);
  128.      Add_window(20,7,60,16,1,6,2);
  129.      gotoxy(1,1);
  130.      Writeln('    Also with the Window Manager');
  131.      Writeln('    Routines, all aspects of the');
  132.      Writeln('    Current window can be manipulated');
  133.      Writeln('    with ease.');
  134.      Writeln;Writeln;Writeln;
  135.      textcolor(black+blink);
  136.      Write('          Press any key ...');
  137.      repeat until keypressed;
  138.      Color_window(1,0);
  139.      repeat until keypressed;
  140.      read(kbd,ch);
  141.      Color_window(12,0);
  142.      repeat until keypressed;
  143.      read(kbd,ch);
  144.      Color_Window(15,5);
  145.      repeat until keypressed;
  146.      read(kbd,ch);
  147.      Color_Window(1,6);
  148.      repeat until keypressed;
  149.      read(kbd,ch);
  150.      Clrscr;
  151.      textcolor(1);
  152.      for i:=1 to 34 do
  153.           begin
  154.                Write(copy(' I can begin typing something and ',i,1));
  155.                sound(1000);
  156.                nosound;
  157.                delay(75);
  158.           end;
  159.      repeat until keypressed;
  160.      read(kbd,ch);
  161.      Add_Window(1,1,80,25,0,7,2);
  162.      Writeln;Writeln('           Add a window instantaneously, and when I am done ');
  163.      Writeln('           with this window, I am returned to the previous window');
  164.      Write('           and my cursor is returned to where I left off and ...');
  165.      repeat until keypressed;
  166.      read(kbd,ch);
  167.      remove(1);
  168.      for i:=1 to 33 do
  169.           begin
  170.                Write(copy('I canfinish what I had started.',i,1));
  171.                sound(1000);
  172.                nosound;
  173.                delay(75);
  174.           end;
  175.      textcolor(1+blink);
  176.      writeln;writeln;writeln;
  177.      Write('          Press a Key ...');
  178.      repeat until keypressed;
  179.      read(kbd,ch);
  180.      clrscr;
  181.      textcolor(32);
  182.      writeln(' Text can be scrolled in either');
  183.      writeln(' direction...');
  184.      delay(3000);
  185.      gotoxy(1,20);
  186.      for i:=1 to 30 do
  187.          begin
  188.               writeln(' This text is scrolling up.');
  189.               delay(75);
  190.          end;
  191.      textcolor(33);
  192.      delay(500);
  193.      for i:=1 to 30 do
  194.          begin
  195.               gotoxy(1,1);
  196.               insline;
  197.               writeln(' This text is scrolling down.');
  198.               delay(75);
  199.           end;
  200.      repeat until keypressed;
  201.      read(kbd,ch);
  202.      remove(1);
  203.      Grow_Window(14,8,67,22,12,0,2);
  204.      Writeln;Writeln;
  205.      TextColor(15);
  206.      Writeln(' And to top it all off, I can easily & Instantly');
  207.      Writeln(' add a title to any of my windows....');
  208.      repeat until keypressed;
  209.      read(kbd,ch);
  210.      Window_Title(' Demo Window #6 ',11);
  211.      gotoxy(17,8);
  212.      Textcolor(11);
  213.      Writeln('Press any key ...');
  214.      repeat until keypressed;
  215.      read(kbd,ch);
  216.      color_window(15,2);
  217.      textcolor(0);
  218.      clrscr;
  219.      Window_Title(' ANOTHER DEMO WINDOW           ',47);
  220.      Textcolor(14);
  221.      gotoxy(17,8);
  222.      write('Press any key ...');
  223.      repeat until keypressed;
  224.      read(kbd,ch);
  225.      remove(1);
  226.      repeat until keypressed;
  227.      read(kbd,ch);
  228.      remove(1);
  229.      repeat until keypressed;
  230.      read(kbd,ch);
  231.      remove(1);
  232.      gotoxy(25,22);
  233.      textcolor(white+blink);
  234.      Writeln('Press any key to end demo...     ');
  235.      repeat until keypressed;
  236.      read(kbd,ch);
  237.      remove(1);
  238.      gotoxy(1,25);
  239. end.
  240.